// ConsoleBase060.cpp : Defines the entry point for the console application.
//

// main.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#define	gdDebug

void myDebugLog(const char * format, ...);
void myDebugLog(const char * format, ...)
{
#ifdef gdDebug
	va_list args;
  	int retval;

  	va_start (args, format);
  	retval = vprintf (format, args);
  	va_end (args);
#endif
}


void ShowMenu()
{
	printf("101-Init				102-Close\n");
	printf("0-exit\n");
}


int main(int argc, char* argv[])
{
	int iArgv1=0;
	int iChoose=0;

	printf("Hello World!\n");

	if (argv[1]!=0) {
		iArgv1=atoi(argv[1]);
	}
	while(1)
	{
		iChoose = -1;
		if (iArgv1==0) {
		
			ShowMenu();
			printf("Enter funtional number to test:");
			scanf("%d",&iChoose);
			if(iChoose==0) break;
		}
		else iChoose=iArgv1;
		switch(iChoose)
		{
			case 101: // Init
myDebugLog("Init OK.\n");
				break;
			case 102: // Close
myDebugLog("Close OK.\n");
				break;
		}
		getchar();
		getchar();
	}
	return 0;
}
